import { observable, action } from 'mobx';
import { TreePage } from 'weaver-mobile-page';
const params = {
  url: '/api/hrm/base/getHrmSearchTree',
  params: { isLoadUser: 1 },
};
export default class OrganizationStore {
  @observable treeStore = new TreePage.Store({ route: '/userCenter/blogAttention/organization' });
  @observable params = params;
  @observable loading = true;

  // 通过请求参数params来获取数据，并设置tree-page类别为2
  @action initTree = () => {
    this.treeStore.getData(params, 2);
    setTimeout(() => {
      this.loading = false;
    }, 300)
  };
}